<template>
    <div class="editorElem">
        <div id="editorElem" style="text-align:left">

        </div>
        <!--<button v-on:click="getContent">查看内容</button>-->
    </div>
</template>

<script>
    import E from 'wangeditor'
    export default {
        name: "ue",
        data () {
            return {
                editorContent:'',
                editorContent_txt:'',
                params:''
            }
        },
        methods: {
            getContent() {
                if(this.editorContent.length===0){
                    return false
                }
                return true;
            }
        },
        mounted() {
            var editor = new E('#editorElem');
            editor.customConfig.onchange = (html) => {
                this.editorContent = editor.txt.html();
                this.editorContent_txt=editor.txt.text();
            }
            editor.create()
        }
    }
</script>

<style scoped>
    .editorElem{
        width: 800px;
        height: auto;
        margin: 0 auto;
    }


</style>